module mux2_1(InA, InB, S, Out);
	input InA, InB, S;
	output Out;
	wire out1, out2, sbar;
	
	not1 not_ins(S,sbar);
	nand2 nand_ins1(InB,S,out1);
	nand2 nand_ins2(InA,sbar,out2);
	nand2 nand_ins3(out1,out2,Out);
	
endmodule
